<?php

namespace App\Models\Plane\Airports\Repositories\Interfaces;

use App\Models\Plane\Airports\Airport;
use Illuminate\Support\Collection;

interface AirportRepositoryInterface
{
    public function addAirport(array $data): Airport;

    public function findOneByCode(string $air_code): ?Airport;

    /**
     * 城市三字码
     * @param string $city_code
     * @return Airport|null
     */
    public function findOneByCityCode(string $city_code): ?Airport;

    public function findOneByName(string $name): ?Airport;

    public function delByCode(string $air_code): bool;

    public function updateAirport(Airport $airport, array $data): bool;

    public function listStations($condition = []): Collection;


    /**
     * 热门站点
     * @param int $limit
     * @return Collection
     */
    public function listHotAirports(int $limit = 6): Collection;

    /**
     * 热门城市
     * @param int $limit
     * @return Collection
     */
    public function listHotCities(int $limit = 6): Collection;
}